package com.common.service;

import java.util.List;

import com.common.entity.PageRole;
import com.common.entity.Role;
import com.common.entity.RoleCorrelationPermission;

/**
 * <p>User: Zhang Kaitao
 * <p>Date: 14-1-28
 * <p>Version: 1.0
 */
public interface RoleService {


    public int createRole(Role role);
    public void deleteRole(Role role);

    /**
     * 添加角色-权限之间关系
     * @param roleId
     * @param permissionIds
     */
    public int correlationPermission(RoleCorrelationPermission rolePermission);

    /**
     * 移除角色-权限之间关系
     * @param roleId
     * @param permissionIds
     */
    public int uncorrelationPermission(RoleCorrelationPermission rolePermission);
    public List<PageRole> getAllRoleList();
    public Role getRoleByName(Role role);
    public List<Role> getRolesList();
}
